package com.codeoss.framework.view.component;

import com.codeoss.framework.expression.Expression;

public class Checkbox extends Component implements IDataBinding,IDataBindSource,IDataType,IVarName,ILabel,IFormFieldExpression{
	private Expression labelExpression;
	private int col;
	private int fieldCol;

	private String dataSource;
	private String dataField;
	private String varName;
	private String dataType;
	private boolean noLabel;
	
	private Expression requiredExpression;
	private Expression readOnlyExpression;
	private Expression defaultValueExpression;
	
	private Expression onChangeExpression;
	public Expression getLabelExpression() {
		return labelExpression;
	}

	public void setLabelExpression(Expression labelExpression) {
		this.labelExpression = labelExpression;
	}

	public int getCol() {
		return col;
	}

	public void setCol(int col) {
		this.col = col;
	}

	public int getFieldCol() {
		return fieldCol;
	}

	public void setFieldCol(int fieldCol) {
		this.fieldCol = fieldCol;
	}

	public String getDataSource() {
		return dataSource;
	}

	public void setDataSource(String dataSource) {
		this.dataSource = dataSource;
	}

	public String getDataField() {
		return dataField;
	}

	public void setDataField(String dataField) {
		this.dataField = dataField;
	}

	public String getVarName() {
		return varName;
	}

	public void setVarName(String varName) {
		this.varName = varName;
	}
	
	@Override
	public String getType() {
		// TODO Auto-generated method stub
		return "checkbox";
	}

	@Override
	public void setDataType(String dataType) {
		// TODO Auto-generated method stub
		this.dataType=dataType;
	}

	@Override
	public String getDataType() {
		// TODO Auto-generated method stub
		return dataType;
	}

	public boolean isNoLabel() {
		return noLabel;
	}

	public void setNoLabel(boolean noLabel) {
		this.noLabel = noLabel;
	}
	
	public Expression getRequiredExpression() {
		return requiredExpression;
	}

	public void setRequiredExpression(Expression requiredExpression) {
		this.requiredExpression = requiredExpression;
	}

	public Expression getReadOnlyExpression() {
		return readOnlyExpression;
	}

	public void setReadOnlyExpression(Expression readOnlyExpression) {
		this.readOnlyExpression = readOnlyExpression;
	}

	public Expression getDefaultValueExpression() {
		return defaultValueExpression;
	}

	public void setDefaultValueExpression(Expression defaultValueExpression) {
		this.defaultValueExpression = defaultValueExpression;
	}

	public Expression getOnChangeExpression() {
		return onChangeExpression;
	}

	public void setOnChangeExpression(Expression onChangeExpression) {
		this.onChangeExpression = onChangeExpression;
	}
}
